<template>
  <div class="c-card" :style="{
      backgroundColor: type === 1 ? '#1890FF' : type === 2 ? '#E6A23C' : type === 3 ? '#909399' : '#F56C6C'
    }">
    <div class="title">
      <div style="display: flex; align-items: center;"><i class="el-icon-info" /></div>
      <div style="display: flex; align-items: center;margin-left: 5px;">{{ info.name }}</div>
    </div>
    <div></div>
  </div>
</template>

<script>
export default {
  name: 'index',
  props: {
    info: {
      type: Object,
      default: {}
    },
    type: {
      type: Number,
      default: 0
    }
  },
  data() {
    return {
      info: this.props.info
    }
  },
  created() {
  },
  methods: {}
}
</script>

<style scoped>
.c-card {
  width: 120px;
  height: 35px;
  border-radius: 5px;
  padding: 10px;
  box-shadow: 2px 2px 5px #aaa7a7;
  color: #f0f0f0;
  display: flex;
  align-items: center;
  cursor: pointer;
  margin: 5px;
  transition: 200ms;
}

.c-card:hover {
  transform: scale(1.02);
}

.c-card:active {
  transform: scale(0.95);
}

.title {
  display: flex;
  align-items: center;
  font-size: 12px;
}
</style>
